﻿using System;
using msilgc.cbuilder.CSyntaxTree;
using msilgc.cbuilder.MSILSyntaxTree;
using msilgc.CSyntaxTree;
using System.Reflection.Emit;

namespace msilgc.cbuilder.CBuilder
{
    internal class NoopTranslator : ITranslator {
        public ICStatement TranslateAndAdd(CMethodBody methodBody, CBasicBlock currentBlock, BasicBlock block, Instruction instruction) {
            if (instruction.Inst != OpCodes.Nop) {
                throw new Exception("not noop!");
            }
            NoopStatement stm = new NoopStatement();
            currentBlock.Statements.Add(stm);
            return stm;
        }
    }
}